#include "bsp_sdcard.h"
#include "bsp_led.h"
#include "sdio.h"
#include "bsp_lcd.h"
void bsp_sdcard_init(void)
{
    HAL_SD_CardInfoTypeDef hal_SDCardInfo;
    HAL_StatusTypeDef hal_Status = HAL_ERROR;

    hal_Status = HAL_SD_GetCardInfo(&hsd, &hal_SDCardInfo);
    if(HAL_OK != hal_Status)
    {
        bsp_led_on(2);
        printf("[ERROR] SD card init failed!\n");//error
        LCD_ShowString(0,48,200,16,16,"SD card init failed!",0xFFFF);
        return;
    }
    printf("[INFO]\nCard Type:%d\nCard Version:%d\nCard Class:%d\nCard Size:%dMB\n",\
                hal_SDCardInfo.CardType,\
                hal_SDCardInfo.CardVersion,\
                hal_SDCardInfo.Class,\
                hal_SDCardInfo.LogBlockNbr>>11);
    LCD_ShowString(0,48,200,16,16,"SD card init success!",0xFFFF);
}
